package com.george.es.book;

import com.george.es.util.IdWorker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * <p>
 *
 * </p>
 *
 * @author GeorgeChan 2019/8/14 14:05
 * @version 1.0
 * @since jdk1.8
 */
@EnableTransactionManagement
@SpringBootApplication
public class ElasticSearchApplication extends POAServletInitializer {
    protected final static Logger LOGGER = LoggerFactory.getLogger(ElasticSearchApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(ElasticSearchApplication.class, args);
        LOGGER.info("启动成功......");
    }

    @Bean
    public IdWorker idWorkker(){
        return new IdWorker(1, 1);
    }
}
